<div class="topicInfo">
    <div class="header">
        <h4 class="title">话题编辑</h4>
    </div>
    <div class="topic-edit">
        <section class="intro">
            <div class="panel panel-default">
                <div class="panel-heading">内容</div>
                <div class="panel-body">
                    <div class="panel panel-default item" ng-repeat="item in topicInfo.intro">
                        <div class="panel-heading item-title">
                            <select class="form-control" id="type" ng-model="item.type">
                                <option value="text">文本</option>
                                <option value="img">图片</option>
                                <option value="video">视频</option>
                            </select>
                            <i class="glyphicon glyphicon-trash" title="删除" ng-click="removeIntroItem(item)"></i>
                        </div>
                        <div class="panel-body item-content">
                            <textarea name="" id="value" class="form-control" ng-model="item.value"></textarea>
                        </div>
                    </div>
                    <div class="add-icon" ng-click="addIntroItem()">
                        <i class="glyphicon glyphicon-plus"></i>
                    </div>
                </div>
            </div>
        </section>
        <section class="other">
            <div class="panel panel-default">
                <div class="panel-heading">基础信息</div>
                <div class="panel-body">
                    <form class="form-horizontal" ng-submit="saveTopicInfo()" id="topicForm">
                        <div class="form-group">
                            <label for="title" class="col-lg-4 col-md-4 control-label">标题</label>
                            <div class="col-lg-6 col-md-8">
                                <input id="title" type="text" class="form-control" placeholder="请输入话题标题" ng-model="topicInfo.title" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="code" class="col-lg-4 col-md-4 control-label">话题编码</label>
                            <div class="col-lg-6 col-md-8">
                                <input id="code" type="text" class="form-control" placeholder="请输入话题编码" ng-model="topicInfo.code" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="top" class="col-lg-4 col-md-4 control-label">是否置顶</label>
                            <div class="col-lg-6 col-md-8">
                                <select class="form-control" id="top" ng-model="topicInfo.top">
                                    <option value="1">是</option>
                                    <option value="0">否</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="tags" class="col-lg-4 col-md-4 control-label">标签</label>
                            <div class="col-lg-6 col-md-8">
                                <input id="tags" type="text" class="form-control" placeholder="标签之间用逗号分隔" ng-model="topicInfo.tags" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="browses" class="col-lg-4 col-md-4 control-label">浏览量</label>
                            <div class="col-lg-6 col-md-8">
                                <p class="form-control-static" id="browses" ng-bind="topicInfo.browses"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="participants" class="col-lg-4 col-md-4 control-label">参与人数</label>
                            <div class="col-lg-6 col-md-8">
                                <p class="form-control-static" id="participants" ng-bind="topicInfo.participants"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="goods" class="col-lg-4 col-md-4 control-label">点赞</label>
                            <div class="col-lg-6 col-md-8">
                                <p class="form-control-static" id="goods" ng-bind="topicInfo.goods"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="comments" class="col-lg-4 col-md-4 control-label">评论数</label>
                            <div class="col-lg-6 col-md-8">
                                <p class="form-control-static" id="comments" ng-bind="topicInfo.comments"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="promulgator" class="col-lg-4 col-md-4 control-label">发布者</label>
                            <div class="col-lg-6 col-md-8">
                                <p class="form-control-static" id="promulgator" ng-bind="topicInfo.promulgator"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="img" class="col-lg-4 col-md-4 control-label">封面图片</label>
                            <div class="col-lg-8 col-md-8">
                                <input type="file" onchange="angular.element(this).scope().uploadPhoto(this.files[0],angular.element(this).scope().topicInfo)"
                                    accept="image/*">
                                <img src="{{topicInfo.background}}" alt="">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </section>
    </div>
    <div class="group">
        <input type="submit" value="提交" class="btn" form="topicForm"/>
        <a href="" class="btn" ng-click="goBack()">返回</a>
    </div>
</div>